home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / BLSEEKEY.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  756 b   |  53 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // BlazeClass
  8. //
  9.  
  10. #ifndef __BCPLUSPLUS__
  11. #pragma inline
  12. #endif
  13.  
  14. #include "fli.h"
  15.  
  16. #ifdef __BCPLUSPLUS__
  17. #pragma hdrstop
  18. #endif
  19.  
  20. #define I asm
  21.  
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23. //
  24. // SeeKey()
  25. //
  26. // Checks for a key stroke
  27. //
  28. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  29.  
  30. int BlazeClass::SeeKey()
  31. {
  32.   I mov ah,1
  33.   I int 16h
  34.   I jnz GotChar
  35.  
  36.   return 0;
  37.  
  38. GotChar:
  39.  
  40.   I mov bx,ax
  41.   I and bx,00ffh
  42.   I and ax,0ff00h
  43.   I xchg al,ah
  44.   I or bx,bx
  45.   I je UseAX
  46.   return _BX;
  47.  
  48. UseAX:
  49.  
  50.   I add ax,256
  51.   return _AX;
  52. }
  53.